home *** CD-ROM | disk | FTP | other *** search
/ MIDICraft's MIDINET CD-ROM / MIDICraft's MIDINET CD-ROM.iso / DOSUTILS / EXCHSYX.DOC < prev    next >
Text File  |  1996-11-14  |  7KB  |  188 lines

  1.         ******************************
  2.                 SENDSYX/RECVSYX v1.1
  3.             (DOS with MPU, SOUNDBLASTER)
  4.     
  5.            send and receive sysex and other midi messages
  6.               by Guenter Nagler 
  7.                 1996 
  8.           (gnagler@ihm.tu-graz.ac.at)
  9.         ******************************
  10.  
  11. [1] BACKGROUND
  12. My KORG i3 is connected to my PC with a midi cable.
  13. This allows to control the keyboard with midi commands
  14. and general sysex dumps. 
  15. First I needed a simply utility to set the keyboard into 
  16. General midi mode, because my midi player ignored all system
  17. exclusive messages (sysex).
  18.  
  19. send:
  20. The SENDSYX utility reads binary .SYX files or text files containing 
  21. midi bytes in hexadecimal format or some predefined midi shortcuts (like
  22. GMon) and sends the data through the MPU or Soundblaster midi interface to
  23. the keyboard. Sometimes the keyboard will send back a reply. The SENDSYX utility
  24. tries to catch these messages.
  25. To exchange data via midi dumps the utility allows to read only
  26. a part of a binary file and encode them into midi dump (7 bytes => 8 midi codes).
  27.  
  28. receive:
  29. The RECVSYX utility listens to the keyboard and waits for a dump. 
  30. It saves the midi system exclusive message into a binary or a text file.
  31.  
  32. [2] FILES DESCRIPTION
  33.  
  34. SENDSYX.EXE..........MSDOS executable for sending midi sysex and other commands
  35. RECVSYX.EXE..........MSDOS executable for receiving midi sysex and other commands
  36. EXCHI3.DOC..........this file, showing usage of SENDSYX.EXE RECVSYX.EXE
  37.  
  38. [3] COPYRIGHT
  39.  
  40. SENDSYX and RECVSYX (c) 1996 were created by Guenter Nagler.
  41.  
  42. SENDSYX and RECVSYX are free and may be used as you wish with this one exception:
  43.  
  44.     You may NOT charge any fee or derive any profit for distribution
  45.     of SENDSYX and RECVSYX.  Thus, you may NOT sell or bundle SENDSYX/RECVSYX 
  46.     with any product in a retail environment (shareware disk distribution, 
  47.     CD-ROM, etc.) without permission of the author.
  48.  
  49. You may give SENDSYX and RECVSYX to your friends, upload it to a BBS, or ftp it to
  50. another internet site, as long as you don't charge anything for it.
  51.  
  52. [4] DISCLAIMER
  53.  
  54. SENDSYX and RECVSYX were designed to read and write midi sysex messages.
  55. Communications are done using original Roland MPU-401 (tm) and 
  56. Creative Labs Soundblaster (tm) midi interfaces.
  57.  
  58. Use SENDSYX at your own risk.  Anything you do with SENDSYX is your
  59. responsibility, and not the author's.  Any damage caused to any person,
  60. computer, software, hardware, company, or business by running SENDSYX 
  61. is your responsibility, and the author will not be liable.
  62.  
  63. If you don't understand these terms, or are not sure of something, or
  64. are afraid something bad might come of using SENDSYX, don't  use  it!
  65. You are here forewarned.
  66.  
  67. [5] INSTALLATION 
  68.  
  69.   Simply copy SENDSYX.EXE and RECVSYX into a directory that is in your path.
  70.  
  71.   C:\> SENDSYX 
  72.  
  73.   C:\> RECVSYX -h
  74.  
  75.   you should get the usage text (see next section)
  76.  
  77. [6] USAGE
  78.  
  79. usage: sysex [-noreply] [-skip #] [-count #] [-echo] [-enc] [-raw] [hex] [cmd] [file] ...
  80. -noreply don't wait for a reply
  81. -skip #  skip bytes of next binary file
  82. -count # read count bytes of next binary file (default: read till end)
  83. -echo    echo sent bytes in hexadecimal format
  84. -enc     dump encode bytes read from binary files
  85. -raw     do not encode bytes read from binary files
  86. hex      send byte (e.g. f0 42 a f7)
  87. cmd      send command (e.g. gmon notesoff ...)
  88. file     end content of binary or hex file
  89. All parameters can be used more than once. Text files can contain hex, cmd, file
  90. -skip,-count,-enc only affect next binary file
  91.  
  92. usage: recvsyx [-h] [-hex] [-echo] [-sysex] [filename]
  93. -hex    save received data to text file (default: binary file)
  94. -echo    echo the received data (hexadecimal)
  95. -sysex    save only sysex messages (F0 ... F7)
  96. filename    save data to filename (default: recv.syx)
  97.  
  98. Important:
  99.   To exchange data with the keyboard the keyboard must be forced to 
  100.   receive and send midi events (e.g. EXCL ON option for korg i3).
  101.   Some keyboard modes might not send any data (e.g. korg i3, song 9 
  102.   in General Midi mode)
  103.  
  104. Important:
  105.   This program works only with a MPU-401 or Soundblaster compatible 
  106.   midi interface. For soundblaster cards the environment variable BLASTER
  107.   must be set to select the correct soundcard port number (A220,A240,A260,A280).
  108.   The MPU midi port must be 300 or 330 or specified in the environment variable 
  109.   MPU (hexadezimal port number).
  110.  
  111. e.g. 
  112. set BLASTER=A240 I5 D0 H5 P300 T6  
  113. set MPU=210
  114.  
  115. sendsyx currently supports following shortcut commands (cmd parameter):
  116. GMon        F0 7E 7F 09 01 F7
  117. Identify    F0 7E 7F 06 01 F7
  118. XGon        F0 08 43 10 4c 00 00 7e 00 f7
  119. GSon        F0 0a 41 10 42 12 40 00 7f 00 41 f7
  120. GSoff        F0 0a 41 10 42 12 40 00 7f 7f 42 f7
  121. LocalOn        sets control 7a to 7f for all channels 
  122. LocalOff    sets control 7a to 0 for all channels 
  123. NotesOff    sets control 7b to 0 for all channels 
  124. OmniOff        sets control 7c to 0 for all channels 
  125. OmniOn        sets control 7d to 0 for all channels 
  126. PolyOff        sets control 7e to 0 for all channels 
  127. PolyOn        sets control 7f to 0 for all channels 
  128. SOX        F0
  129. EOX        F7
  130.  
  131. The command set can be advanced by writing a binary or text file
  132. containing hex and cmd sequences. These files can be used
  133. in command line or text files.
  134.  
  135. Batch files for simple settings simplify use of sendsyx.
  136.  
  137. [7] SUGGESTIONS / COMMENTS / BUG REPORTS / QUESTIONS
  138.  
  139.          WWW:    http://hgiicm.tu-graz.ac.at/Cpub
  140.           contains all my dos/unix midi programs
  141.          EMAIL:  gnagler@ihm.tu-graz.ac.at
  142.  
  143. [8] EXAMPLES
  144.  
  145. set General Midi Mode:
  146. C:\> sendsyx -echo gmon
  147. F0 7E 7F 09 01 F7 
  148. 6 bytes sent, waiting for reply... no reply
  149.  
  150. A batch file the sets General Midi Mode:
  151.  
  152. GMON.BAT:
  153. @echo off
  154. sendsyx -noreply gmon
  155.  
  156. Start the batch file GMON.BAT:
  157. C:\> gmon
  158.  
  159. A batch file that sends part of a binary file as a dump:
  160. @echo off
  161. sendsyx -echo f0 42 30 39 4c -skip 0xd67 -encode %1 f7
  162.  
  163. C:\> sendpcg korg.pcg 
  164. F0 42 30 39 4C <encoded data> F7 
  165. 9310 bytes sent, waiting for reply...
  166. reply: f0 42 30 39 26 f7
  167.  
  168. In the manual of the keyboard it can be read what this reply means:
  169. "data load completed"
  170.  
  171. receive any data from midi interface (play on keyboard):
  172. C:\> recvsyx -echo -hex any.syx
  173. F8 F8 F8 F8 F8 F8 F8 F8 
  174. 90 2D 5B F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 
  175. 90 2F 57 F8 
  176. 80 2D 40 F8 F8 F8 F8 F8 F8 
  177. 80 2F 40 F8 
  178.  
  179. receive a sysex dump (send manually from keyboard):
  180. C:\> recvsyx -sysex dump.syx
  181. recording...
  182. *
  183.  
  184. [9] CHANGES
  185. v1.0 to v1.1:
  186.   * allow MPU port other than 300 or 330 (environment variable MPU)
  187.  
  188.